From d5ade2359539648845a5854ed353b29367961d74 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 20 Nov 2023 11:02:20 +0100 Subject: refactor(components): extract MetaItem from MetaList * replace `items` prop on MetaList with `children` prop: it was too restrictive and the global options was not really useful. It is better too give control to the consumers. --- src/pages/sujet/[slug].tsx | 114 ++++++++++++++++++++++----------------------- 1 file changed, 56 insertions(+), 58 deletions(-) (limited to 'src/pages/sujet/[slug].tsx') diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx index a475df9..d9734a3 100644 --- a/src/pages/sujet/[slug].tsx +++ b/src/pages/sujet/[slug].tsx @@ -10,10 +10,11 @@ import { getLayout, Heading, LinksWidget, - type MetaItemData, PageLayout, PostsList, Time, + MetaList, + MetaItem, } from '../../components'; import { getAllTopicsSlugs, @@ -61,62 +62,6 @@ const TopicPage: NextPageWithLayout = ({ url: `${ROUTES.TOPICS}/${slug}`, }); - const headerMeta: (MetaItemData | undefined)[] = [ - { - id: 'publication-date', - label: intl.formatMessage({ - defaultMessage: 'Published on:', - description: 'TopicPage: publication date label', - id: 'KV+NMZ', - }), - value: